﻿@model FieldControlViewModel
@{
	string dataVal = string.Empty;
	string dataValMsg = string.Empty;
	if (Model.EnableNull)
	{
		dataVal += " data-val-required=\"不能为空\" ";
	}
	if (!string.IsNullOrEmpty(dataVal))
	{
		dataVal += " data-val=\"true\" ";
		dataValMsg = " data-valmsg-for=\"" + Model.Prefix + Model.FieldName + "\" data-valmsg-replace=\"true\"";
	}
}
<div class="layui-input-inline" style="width:75%;">
	<input type="text" class="layui-input" name="@Model.Prefix@Model.FieldName" id="@Model.Prefix@Model.FieldName" value="@Model.FieldValue" @Html.Raw(dataVal) />
</div>
<div class="layui-input-inline layui-input-company" style="width:100px;">
	<button class="layui-btn layui-btn-sm layuiadmin-btn-list" type="button" onclick="layer_show('选择品牌','/Admin/Shop/TrademarkSelect?OpenerText=@{@Model.Prefix@Model.FieldName}')">浏览</button>
</div>
<span class="layui-bg-green" style="display:inline-block;">@Model.Description</span>
<span style="color:red;" @Html.Raw(dataValMsg)></span>